package calendar;

import java.util.Calendar;

public class CalendarTest {
	public static void main(String[] args) {
		
		Calendar cal = Calendar.getInstance();
		int year = cal.get(Calendar.YEAR);
		int month = cal.get(Calendar.MONTH)+1;
		int week = cal.get(Calendar.DAY_OF_WEEK)-1;
		int day = cal.get(Calendar.DAY_OF_MONTH);
		System.out.println(year);
		System.out.println(month);
		System.out.println(week);
		System.out.println(day);
		
		cal.set(Calendar.YEAR, 2018);
		System.out.println(cal.get(Calendar.YEAR ));
		cal.set(Calendar.MONTH, 1);
		System.out.println(cal.get(Calendar.MONTH));
		cal.set(Calendar.DAY_OF_MONTH, 1);
		System.out.println(cal.get(Calendar.DAY_OF_MONTH));
	}

}
